
QT       += core gui multimedia network sql xml core_private gui_private widgets_private

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webenginewidgets webchannel

TARGET = ViChat
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0


SOURCES += \
    main.cpp \
    mainwindow.cpp \
    immainwindow.cpp \
    mainwidget.cpp \
    loginwidget.cpp \
    clientcallback.cpp \
    confsettings.cpp \
    contactitem.cpp \
    chatroom.cpp \
    chatwidget.cpp \
    videolayoutwidget.cpp \
    videowindow.cpp \
    emotionwidget.cpp \
    videolayoutconfig.cpp \
    systemsettingform.cpp \
    zoomvideowidget.cpp \
    channelitemmodel.cpp \
    channelitemview.cpp \
    channelchatroom.cpp \
    p2pchatroom.cpp \
    dispatchwidget.cpp \
    switchwidget.cpp \
    dispatchvideo.cpp

HEADERS += \
    mainwindow.h \
    immainwindow.h \
    mainwidget.h \
    loginwidget.h \
    clientcallback.h \
    confsettings.h \
    contactitem.h \
    chatroom.h \
    chatwidget.h \
    videolayoutwidget.h \
    videowindow.h \
    emotionwidget.h \
    videolayoutconfig.h \
    systemsettingform.h \
    zoomvideowidget.h \
    channelitemmodel.h \
    channelitemview.h \
    channelchatroom.h \
    p2pchatroom.h \
    dispatchwidget.h \
    switchwidget.h \
    dispatchvideo.h

FORMS += \
    mainwidget.ui \
    loginwidget.ui \
    chatroom.ui \
    chatwidget.ui \
    videolayoutconfig.ui \
    systemsettingform.ui \
    switchwidget.ui

RESOURCES += \
    resource/qrc/resource.qrc

include(tools/tools.pri)
include(struct/struct.pri)
include(3rdparty/3rdparty.pri)
include(resource/version.pri)

INCLUDEPATH += $$PWD/libndchat/api \
               $$PWD/tools $$PWD/struct $$PWD/3rdparty

TRANSLATIONS = translations/vichat_en.ts

CONFIG(debug, debug|release): {
    LIBS += -L$$PWD/libndchat/debug
}
else {
    DEFINES += QT_NO_DEBUG_OUTPUT
    CONFIG += force_debug_info
    LIBS += -L$$PWD/libndchat/release
}

LIBS += -llibchat -llibmedia

win32 {
    DEFINES += _USING_V110_SDK71_ PSAPI_VERSION=1
    LIBS += -lPsapi -lUser32 -lDbghelp
    QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE\",5.01\"
    QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS\",5.01\"
    QMAKE_LFLAGS += /MANIFESTUAC:level=\'requireAdministrator\'
}else{
    unix:DEFINES += LINUX
}
